package com.example.petplanet.mapper;


import com.example.petplanet.domain.Content;
import com.example.petplanet.dto.CallBackDTO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ContentDao {
    List<Content> getAllContent(Long userId);
    List<Content> getMyContents(Long userId);
    boolean contentIsNotExist(Long contentId);
    int editContent(Long userId,Long contentId,String description,boolean permission);
    int deleteContent(Long contentId);
    int deleteFileByObjectName(String object);
    int saveText(Long userId,Content content);
    Long getContentId();//调用最新的
    int saveFile(List<CallBackDTO> list, Long contentId, String uploadId);
    Content getContentById(Long contentId);

    int batchUpdateContentGoodCount(List<Content> contents);

    List<String> selectFileNames(Long contentId);
}
